pathToImg = "C:\\Users\\Public\\Pictures\\Sample Pictures\\";
images_to_open = newArray("Chrysanthemum.jpg", "Desert.jpg", "Hydrangeas.jpg");

saveImgPath = "C:\\Users\\Public\\Pictures\\Sample Pictures\\";
saveImgName = "stack_from_downsampled_open_images.zip";
saveImgType = "ZIP";

scale = 0.25;  // the ratio to downsample to

// Open all imgs
for( i = 0; i < images_to_open.length; i++ ) {

	open(pathToImg + images_to_open[i]);
}

// Downsample imgs (in prep of sending the stack to the client for previewing)
for( i = 0; i < images_to_open.length; i++ ) {

	selectWindow(images_to_open[i]);
	run("Scale...", "x=" + scale + " y=" + scale + " width=" + getWidth()*scale + " height=" + getHeight()*scale + " interpolation=Bilinear average create title=[]");
}


// Create the stack from all open images - first close the orig (full-sized) img windows so we don't stack them
for( i = 0; i < images_to_open.length; i++ ) {

	selectWindow(images_to_open[i]);
	close();
}
run("Images to Stack", "name=[] title=[] use keep");

saveAs(saveImgType, saveImgPath + saveImgName);